/*
 * XML Type:  BankAccount
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.BankAccount
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML BankAccount(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class BankAccountImpl extends net.ofx.types.x2003.x04.impl.AbstractAccountImpl implements net.ofx.types.x2003.x04.BankAccount
{
    
    public BankAccountImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BANKID$0 = 
        new javax.xml.namespace.QName("", "BANKID");
    private static final javax.xml.namespace.QName BRANCHID$2 = 
        new javax.xml.namespace.QName("", "BRANCHID");
    private static final javax.xml.namespace.QName ACCTID$4 = 
        new javax.xml.namespace.QName("", "ACCTID");
    private static final javax.xml.namespace.QName ACCTTYPE$6 = 
        new javax.xml.namespace.QName("", "ACCTTYPE");
    private static final javax.xml.namespace.QName ACCTKEY$8 = 
        new javax.xml.namespace.QName("", "ACCTKEY");
    
    
    /**
     * Gets the "BANKID" element
     */
    public java.lang.String getBANKID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BANKID$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "BANKID" element
     */
    public net.ofx.types.x2003.x04.BankIdType xgetBANKID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankIdType target = null;
            target = (net.ofx.types.x2003.x04.BankIdType)get_store().find_element_user(BANKID$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "BANKID" element
     */
    public void setBANKID(java.lang.String bankid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BANKID$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(BANKID$0);
            }
            target.setStringValue(bankid);
        }
    }
    
    /**
     * Sets (as xml) the "BANKID" element
     */
    public void xsetBANKID(net.ofx.types.x2003.x04.BankIdType bankid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankIdType target = null;
            target = (net.ofx.types.x2003.x04.BankIdType)get_store().find_element_user(BANKID$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankIdType)get_store().add_element_user(BANKID$0);
            }
            target.set(bankid);
        }
    }
    
    /**
     * Gets the "BRANCHID" element
     */
    public java.lang.String getBRANCHID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BRANCHID$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "BRANCHID" element
     */
    public net.ofx.types.x2003.x04.AccountIdType xgetBRANCHID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountIdType target = null;
            target = (net.ofx.types.x2003.x04.AccountIdType)get_store().find_element_user(BRANCHID$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "BRANCHID" element
     */
    public boolean isSetBRANCHID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BRANCHID$2) != 0;
        }
    }
    
    /**
     * Sets the "BRANCHID" element
     */
    public void setBRANCHID(java.lang.String branchid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BRANCHID$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(BRANCHID$2);
            }
            target.setStringValue(branchid);
        }
    }
    
    /**
     * Sets (as xml) the "BRANCHID" element
     */
    public void xsetBRANCHID(net.ofx.types.x2003.x04.AccountIdType branchid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountIdType target = null;
            target = (net.ofx.types.x2003.x04.AccountIdType)get_store().find_element_user(BRANCHID$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AccountIdType)get_store().add_element_user(BRANCHID$2);
            }
            target.set(branchid);
        }
    }
    
    /**
     * Unsets the "BRANCHID" element
     */
    public void unsetBRANCHID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BRANCHID$2, 0);
        }
    }
    
    /**
     * Gets the "ACCTID" element
     */
    public java.lang.String getACCTID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCTID$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "ACCTID" element
     */
    public net.ofx.types.x2003.x04.AccountIdType xgetACCTID()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountIdType target = null;
            target = (net.ofx.types.x2003.x04.AccountIdType)get_store().find_element_user(ACCTID$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "ACCTID" element
     */
    public void setACCTID(java.lang.String acctid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCTID$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACCTID$4);
            }
            target.setStringValue(acctid);
        }
    }
    
    /**
     * Sets (as xml) the "ACCTID" element
     */
    public void xsetACCTID(net.ofx.types.x2003.x04.AccountIdType acctid)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountIdType target = null;
            target = (net.ofx.types.x2003.x04.AccountIdType)get_store().find_element_user(ACCTID$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AccountIdType)get_store().add_element_user(ACCTID$4);
            }
            target.set(acctid);
        }
    }
    
    /**
     * Gets the "ACCTTYPE" element
     */
    public net.ofx.types.x2003.x04.AccountEnum.Enum getACCTTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCTTYPE$6, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.AccountEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "ACCTTYPE" element
     */
    public net.ofx.types.x2003.x04.AccountEnum xgetACCTTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountEnum target = null;
            target = (net.ofx.types.x2003.x04.AccountEnum)get_store().find_element_user(ACCTTYPE$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "ACCTTYPE" element
     */
    public void setACCTTYPE(net.ofx.types.x2003.x04.AccountEnum.Enum accttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCTTYPE$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACCTTYPE$6);
            }
            target.setEnumValue(accttype);
        }
    }
    
    /**
     * Sets (as xml) the "ACCTTYPE" element
     */
    public void xsetACCTTYPE(net.ofx.types.x2003.x04.AccountEnum accttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountEnum target = null;
            target = (net.ofx.types.x2003.x04.AccountEnum)get_store().find_element_user(ACCTTYPE$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AccountEnum)get_store().add_element_user(ACCTTYPE$6);
            }
            target.set(accttype);
        }
    }
    
    /**
     * Gets the "ACCTKEY" element
     */
    public java.lang.String getACCTKEY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCTKEY$8, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "ACCTKEY" element
     */
    public net.ofx.types.x2003.x04.AccountIdType xgetACCTKEY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountIdType target = null;
            target = (net.ofx.types.x2003.x04.AccountIdType)get_store().find_element_user(ACCTKEY$8, 0);
            return target;
        }
    }
    
    /**
     * True if has "ACCTKEY" element
     */
    public boolean isSetACCTKEY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ACCTKEY$8) != 0;
        }
    }
    
    /**
     * Sets the "ACCTKEY" element
     */
    public void setACCTKEY(java.lang.String acctkey)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCTKEY$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACCTKEY$8);
            }
            target.setStringValue(acctkey);
        }
    }
    
    /**
     * Sets (as xml) the "ACCTKEY" element
     */
    public void xsetACCTKEY(net.ofx.types.x2003.x04.AccountIdType acctkey)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountIdType target = null;
            target = (net.ofx.types.x2003.x04.AccountIdType)get_store().find_element_user(ACCTKEY$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AccountIdType)get_store().add_element_user(ACCTKEY$8);
            }
            target.set(acctkey);
        }
    }
    
    /**
     * Unsets the "ACCTKEY" element
     */
    public void unsetACCTKEY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ACCTKEY$8, 0);
        }
    }
}
